---------------------------------  Menu ---------------------------------
local SlobPanel
local SlobList

function CreateSlobBotButton(a, b)
    SLOBBUTTON = vgui.Create("DButton")
    SLOBBUTTON:SetSize(0, 20)
    SLOBBUTTON:SetText(a)
    SLOBBUTTON.DoClick = function()
		RunConsoleCommand(b)
    end
    SlobList:AddItem(SLOBBUTTON)
end


concommand.Add("+wots_menu", function()
    SlobPanel = vgui.Create("DFrame")
	SlobPanel:Center()
    SlobPanel:SetSize(350, 350)
    SlobPanel:SetTitle("SlobBot v0.2")
    SlobPanel:SetVisible(true)
    SlobPanel:SetDraggable(true)
    SlobPanel:ShowCloseButton(false)
	SlobPanel.Paint = function()
		draw.RoundedBox(6, 0, 0, SlobPanel:GetWide(), SlobPanel:GetTall(), Color(176, 226, 255, 225))
		surface.SetDrawColor(color_white)
  		surface.DrawOutlinedRect(0, 0, SlobPanel:GetWide(), SlobPanel:GetTall())
	end
    SlobPanel:MakePopup()


    SlobList = vgui.Create("DPanelList", SlobPanel)
    SlobList:SetPos(30, 30)
    SlobList:SetSize(290, 290)
    SlobList:SetSpacing(5)
    SlobList:SetPadding(5)
    SlobList:EnableHorizontal(false)
    SlobList:EnableVerticalScrollbar(true)


    local AutoAttackCat = vgui.Create("DCheckBoxLabel")
    AutoAttackCat:SetText("Auto attack")
    AutoAttackCat:SetConVar("wots_aimbot_autoattack")
    AutoAttackCat:SetValue(GetConVarNumber("wots_aimbot_autoattack"))
    AutoAttackCat:SizeToContents()
    SlobList:AddItem(AutoAttackCat)


    local MouseLockCat = vgui.Create("DCheckBoxLabel")
    MouseLockCat:SetText("Mouse lock")
    MouseLockCat:SetConVar("wots_aimbot_mouselock")
    MouseLockCat:SetValue(GetConVarNumber("wots_aimbot_mouselock"))
    MouseLockCat:SizeToContents()
    SlobList:AddItem(MouseLockCat)


    local TeamModeCat = vgui.Create("DCheckBoxLabel")
    TeamModeCat:SetText("Team mode")
    TeamModeCat:SetConVar("wots_aimbot_teammode")
    TeamModeCat:SetValue(GetConVarNumber("wots_aimbot_teammode"))
    TeamModeCat:SizeToContents()
    SlobList:AddItem(TeamModeCat)

    local AADelay = vgui.Create("DNumSlider")
    AADelay:SetSize(150, 50)
    AADelay:SetText("Auto attack delay")
    AADelay:SetMin(0)
    AADelay:SetMax(10)
    AADelay:SetDecimals(1)
    AADelay:SetConVar("wots_aimbot_autoattack_delay")
    SlobList:AddItem(AADelay)

    local OFFSET = vgui.Create("DNumSlider")
    OFFSET:SetSize(150, 50)
    OFFSET:SetText("Offset")
    OFFSET:SetMin(-100)
    OFFSET:SetMax(100)
    OFFSET:SetDecimals(1)
    OFFSET:SetConVar("wots_aimbot_add")
    SlobList:AddItem(OFFSET)
	
	local attackto = vgui.Create("DNumSlider")
    attackto:SetSize(150, 50)
    attackto:SetText("1 = players, 2 = npc, 3 = both")
    attackto:SetMin(1)
    attackto:SetMax(3)
    attackto:SetDecimals(0)
    attackto:SetConVar("wots_attackto")
    SlobList:AddItem(attackto)
	
	local protectBuddys = vgui.Create("DCheckBoxLabel")
	protectBuddys:SetText("Protect players with this nickname:")
	protectBuddys:SetConVar("wots_buddy_attack")
	protectBuddys:SetValue(GetConVarNumber("wots_buddy_attack"))
	protectBuddys:SizeToContents()
	SlobList:AddItem(protectBuddys)
	
	local buddy1 = vgui.Create("DTextEntry")
	buddy1:SetSize(0,20)
	buddy1:SetText("Friend nickname here.")
	buddy1:SetConVar("wots_buddy_1")
	SlobList:AddItem(buddy1)
	
	local buddy2 = vgui.Create("DTextEntry")
	buddy2:SetSize(0,20)
	buddy2:SetText("Friend nickname here.")
	buddy2:SetConVar("wots_buddy_2")
	SlobList:AddItem(buddy2)
	
	local buddy3 = vgui.Create("DTextEntry")
	buddy3:SetSize(0,20)
	buddy3:SetText("Friend nickname here.")
	buddy3:SetConVar("wots_buddy_3")
	SlobList:AddItem(buddy3)
	
	local buddy4 = vgui.Create("DTextEntry")
	buddy4:SetSize(0,20)
	buddy4:SetText("Friend nickname here.")
	buddy4:SetConVar("wots_buddy_4")
	SlobList:AddItem(buddy4)
	
	local buddy5 = vgui.Create("DTextEntry")
	buddy5:SetSize(0,20)
	buddy5:SetText("Friend nickname here.")
	buddy5:SetConVar("wots_buddy_5")
	SlobList:AddItem(buddy5)

    CreateSlobBotButton("ESP", "wots_toggleesp")
	

	CreateSlobBotButton("SpyCamera", "wots_camera")

	local cameraposx = vgui.Create("DNumSlider")
    cameraposx:SetSize(150, 50)
    cameraposx:SetText("X pos of camera")
    cameraposx:SetMin(-10000)
    cameraposx:SetMax(10000)
    cameraposx:SetDecimals(2)
    cameraposx:SetConVar("wots_cm_x")
    SlobList:AddItem(cameraposx)
	
	local cameraposy = vgui.Create("DNumSlider")
    cameraposy:SetSize(150, 50)
    cameraposy:SetText("Y pos of camera")
    cameraposy:SetMin(-10000)
    cameraposy:SetMax(10000)
    cameraposy:SetDecimals(2)
    cameraposy:SetConVar("wots_cm_y")
    SlobList:AddItem(cameraposy)
	
	local cameraposz = vgui.Create("DNumSlider")
    cameraposz:SetSize(150, 50)
    cameraposz:SetText("Z pos of camera")
    cameraposz:SetMin(-10000)
    cameraposz:SetMax(10000)
    cameraposz:SetDecimals(2)
    cameraposz:SetConVar("wots_cm_z")
    SlobList:AddItem(cameraposz)
	
	local cameraposwidth = vgui.Create("DNumSlider")
    cameraposwidth:SetSize(150, 50)
    cameraposwidth:SetText("Width of camera")
    cameraposwidth:SetMin(1)
    cameraposwidth:SetMax(100)
    cameraposwidth:SetDecimals(0)
    cameraposwidth:SetConVar("wots_cm_w")
    SlobList:AddItem(cameraposwidth)
	
	local cameraposheight = vgui.Create("DNumSlider")
    cameraposheight:SetSize(150, 50)
    cameraposheight:SetText("Height of camera")
    cameraposheight:SetMin(1)
    cameraposheight:SetMax(100)
    cameraposheight:SetDecimals(0)
    cameraposheight:SetConVar("wots_cm_h")
    SlobList:AddItem(cameraposheight)

	CreateSlobBotButton("Follow this player","wots_camera_follow","wots_followingto")
	
	local followto = vgui.Create("DTextEntry")
	followto:SetSize(0,20)
	followto:SetText("Who to follow?")
	followto:SetConVar("wots_followingto")
	SlobList:AddItem(followto)
	
	local copy = vgui.Create("DLabel")
	copy:SetText("Click for copy a name")
	copy:SizeToContents()
	SlobList:AddItem(copy)
	
	local PlayersList = vgui.Create("DListView")
	PlayersList:SetParent(DermaPanel)
	PlayersList:SetPos(25, 50)
	PlayersList:SetSize(150, 150)
	PlayersList:SetMultiSelect(false)
	PlayersList:AddColumn("Name") // Add column
	PlayersList:AddColumn("Is admin?")	
	SlobList:AddItem(PlayersList)
	function PlayersList:OnRowSelected(Row)
		SlobNotify("Name copied to clipboard")
		SetClipboardText(listofplayers[Row])
	end
	listofplayers = {}
	for k,v in pairs(player.GetAll()) do
		PlayersList:AddLine(v:Nick(),tostring(v:IsAdmin()))
		table.insert(listofplayers, v:Nick())
	end 
			
	CreateSlobBotButton("Place cam here","wots_camerainmypos")
	
		
    CreateSlobBotButton("WireFrame", "wots_togglewireframe")


    CreateSlobBotButton("DarkRP mode", "wots_togglerphack")
	
	
	CreateSlobBotButton("Zombiefied World mode", "wots_togglezwhack")

	
    CreateSlobBotButton("Name changer", "wots_toggleimmunity")

	
	CreateSlobBotButton("Megaspam","wots_megaspam")

end)


concommand.Add("-wots_menu", function()
    SlobPanel:Close()
end)

------------------------------------------------------------------------------